package svc

import (
	"book/api/internal/config"
	"book/book_srv/book"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config  config.Config
	BookSrv book.Book
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		BookSrv: book.NewBook(zrpc.MustNewClient(c.BookSrv)),
	}
}
